<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var arr = [1,2,3,4]
			var arr2 = [
				{name:"xiaoye",age:20},
				{name:"xiaoye2",age:23},
				{name:"xiaoye3",age:26}
			]
			
			/**
			 * 1,join
			 * 接收一个参数，元素分割符
			 */
			let arr_join = arr.join('-')
			console.log(arr_join);
			
			let arr2_join = arr2.join('*')
			console.log(arr2_join);
			
			/**
			 * 重复的字符串
			 * @param {String} str 要重复的字符串
			 * @param {Number} n 重复的次数
			 */
			function ref(str,n){
				return new Array(n+1).join(str)
			}
			console.log(ref('哈',50));
			
			
			var d = new Date();
			let year = d.getFullYear(),
			month = d.getMonth()+1,
			date = d.getDate(),
			hours = d.getHours(),
			minyte =  d.getMinutes(),
			secon = d.getSeconds()
			
			console.log(year,month,date,hours,minyte,secon);
			
			var dd = new Date().toLocaleString()
			console.log(dd);
			
		</script>
	</body>
</html>
